﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MockupDesigner.AppItems;
using System.ComponentModel;
using System.Windows.Controls;
using System.Windows;
using MockupDesigner.Editors.ValidableEditors;

namespace MockupDesigner.Items
{
    [WebPageEditor]
    public class WebPageItem : ResizableItem
    {
       
        public static readonly DependencyProperty AddressProperty =
            DependencyProperty.Register("Address", typeof(string), typeof(WebPageItem), new UIPropertyMetadata(string.Empty));

        [Category("Prop_Content")]
        public string Address
        {
            get { return (string)GetValue(AddressProperty); }
            set
            {
                if (this.Address == value) return;
                OnPropertyChanging("Address", this.Address, value);
                SetValue(AddressProperty, value);
                OnPropertyChanged("Address");
            }
        }

        public static readonly DependencyProperty TitleProperty =
            DependencyProperty.Register("Title", typeof(string), typeof(WebPageItem), new UIPropertyMetadata(string.Empty));

        [Category("Prop_Content")]
        public string Title
        {
            get { return (string)GetValue(TitleProperty); }
            set
            {
                if (this.Title == value) return;
                OnPropertyChanging("Title", this.Title, value);
                SetValue(TitleProperty, value);
                OnPropertyChanged("Title");
            }
        }

        public override Size GetPreferredSize()
        {
            return new Size(640, 480);
        }

    }
}
